/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.net.greenet.logmanage.logic.bean;

import com.j256.ormlite.field.DataType;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
import java.sql.Timestamp;

/**
 *
 * @author dongqiang
 */
@DatabaseTable(tableName="MessageOutGoingLog")
public class MessageOutGoingLogBean {
    public static final String ID = "id";
    public static final String MESSAGE_TYPE = "messageType";
    public static final String MESSAGE_NO = "messageNo";
    public static final String MESSAGE_SEQUENCE_NO = "messageSequenceNo";
    public static final String MESSAGE_SERIAL_NO = "messageSerialNo";
    public static final String SEND_START_TIME = "sendStartTime";
    public static final String SEND_STOP_TIME = "sendStopTime";
    public static final String SEND_ERROR = "sendError";
    public static final String IS_SEND_SUCCESS = "isSentSuccess";
    public static final String DPI_ENDPOINT_BEAN_ID = "DPIEndPointBean_id";
    
    @DatabaseField(columnName=ID, id=true)
    private long id;
    
    @DatabaseField(columnName=MESSAGE_TYPE)
    private String messageType;
    
    @DatabaseField(columnName=MESSAGE_NO)
    private int messageNo;
    
    @DatabaseField(columnName=MESSAGE_SEQUENCE_NO)
    private long messageSequenceNo;
    
    @DatabaseField(columnName=MESSAGE_SERIAL_NO)
    private long messageSerialNo;
    
    @DatabaseField(columnName=SEND_START_TIME, dataType=DataType.TIME_STAMP)
    private Timestamp sendStartTime;
    
    @DatabaseField(columnName=SEND_STOP_TIME, dataType=DataType.TIME_STAMP)
    private Timestamp sendStopTime;
    
    @DatabaseField(columnName=SEND_ERROR)
    private String sendError;
    
    @DatabaseField(columnName=IS_SEND_SUCCESS)
    private boolean sentSuccess;
    
    @DatabaseField(columnName=DPI_ENDPOINT_BEAN_ID, foreign = true)
    private DPIEndPointBean dpi;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getMessageType() {
        return messageType;
    }

    public void setMessageType(String messageType) {
        this.messageType = messageType;
    }

    public int getMessageNo() {
        return messageNo;
    }

    public void setMessageNo(int messageNo) {
        this.messageNo = messageNo;
    }

    public long getMessageSequenceNo() {
        return messageSequenceNo;
    }

    public void setMessageSequenceNo(long messageSequenceNo) {
        this.messageSequenceNo = messageSequenceNo;
    }

    public long getMessageSerialNo() {
        return messageSerialNo;
    }

    public void setMessageSerialNo(long messageSerialNo) {
        this.messageSerialNo = messageSerialNo;
    }

    public Timestamp getSendStartTime() {
        return sendStartTime;
    }

    public void setSendStartTime(Timestamp sendStartTime) {
        this.sendStartTime = sendStartTime;
    }

    public Timestamp getSendStopTime() {
        return sendStopTime;
    }

    public void setSendStopTime(Timestamp sendStopTime) {
        this.sendStopTime = sendStopTime;
    }

    public String getSendError() {
        return sendError;
    }

    public void setSendError(String sendError) {
        this.sendError = sendError;
    }

    public boolean isSentSuccess() {
        return sentSuccess;
    }

    public void setSentSuccess(boolean sentSuccess) {
        this.sentSuccess = sentSuccess;
    }

    public DPIEndPointBean getDpi() {
        return dpi;
    }

    public void setDpi(DPIEndPointBean dpi) {
        this.dpi = dpi;
    }

    @Override
    public int hashCode() {
        return super.hashCode(); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public boolean equals(Object other) {
        if (other == null || other.getClass() != getClass()) {
            return false;
        }
        return id == ((MessageOutGoingLogBean)other).id;
    }
    
}
